﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using SSP;

namespace SSPDemo
{
    class ClosingMovie:SSPScene
    {
        SSPMovie closingMovie;

        public ClosingMovie()
        {
            closingMovie = new SSPMovie("closing");
            this.addChild(closingMovie);
            isInputEnabled = false;
            closingMovie.Play();
        }

        public override void update()
        {
            if (closingMovie.isDone())
            {
                SSPDirector.Instance.replaceScene(new Credits());
            }

            base.update();
        }

        public override void DoPlayerAction(PlayerAction action)
        {
            if (action == PlayerAction.Jump)
            {
                closingMovie.Stop();
            }
        }
    }
}